// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import App from './App'
import router from './router'
import store from './store'
import echarts from 'echarts'
import moment from 'moment'
import * as filters from './filters' // global filters
import request from './utils/request'
import {download} from './utils/download'

Vue.config.productionTip = false

Vue.use(ElementUI);

Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

Vue.prototype.$echarts = echarts
Vue.prototype.$moment = moment
Vue.prototype.$http = request
Vue.prototype.$download = download
moment.locale('zh-cn')

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: {App},
  template: '<App/>'
})
